<template >
      <div style="margin-left: 10px;float: left;">
        <jsvideo :URL="url" :Id="paly" :key="componentKey"/>
        <el-input style="width: 80%; margin-top: 10px;margin-right: 10px;" v-model="name" placeholder="视频地址"></el-input>
        <el-button @click="test" type="primary">确定</el-button>
      </div>
     
</template>
<script >
import jsvideo from '../components/jsvideo.vue'
export default {
  name: 'App',
  props: ['myName'],
  components: {
    jsvideo
  },
  data() {
    return {
      url: this.myName.url,
      paly: this.myName.id
      // url: require('../../public/4.mp4')
      // url: 'http://172.16.6.28:8080/live/hwh264/hls.m3u8'
      // url: 'http://59.207.129.130:23005/live/41048100001310916530/hls.m3u8',
      // url: 'http://172.16.8.197:8080/live1/test/hls.m3u8'
      // url: 'http://59.207.129.130:23006/test/wg/video/03dd5b72-2487-4960-8f08-831ea701c3ae.mp4'
      // url: ''
      // url: 'http://59.207.129.130:23006/test/wg/video/2022-07-15/5fbcdf82-ae91-4ef7-a90a-49e929f6ca83.mp4'
      ,
      name: '',
      componentKey: 0
    }
  },
  methods:{
    test(){
      this.url = this.name
      // this.url = 'http://59.207.129.130:18866/live?url=rtsp://59.207.129.130:554/openUrl/wLpXJD2'
      this.$forceUpdate()
      this.componentKey += 1
        // this.$refs.rtsp.open();
    }
  }
}
</script>